export const imgerror = {
  inserted(el, binding) {
    // onerror方法在图片加载不出来时会自动调用
    el.src = el.src || binding.value
    el.onerror = function() {
      el.src = binding.value
    }
  },
  componentUpdated(dom, options) {
    dom.src = dom.src || options.value
  }
}
